@echo off

cd /d %~dp0
set "BIN_HOME=%cd%"
cd ..
set "PRJ_HOME=%cd%"
cd %BIN_HOME%
set "LOG_HOME=%PRJ_HOME%\logs"

setlocal EnableDelayedExpansion
set CLASSPATH=%PRJ_HOME%\conf
for /F %%j in ('dir /s/b %PRJ_HOME%\lib\*.jar') do set CLASSPATH=!CLASSPATH!;%%j

if exist "%LOG_HOME%" goto jvmRun
mkdir %LOG_HOME%

:jvmRun
java -classpath %CLASSPATH% -Dlogging.home=%LOG_HOME% com.spiro.TestThriftServerMain %*